<template>
  <div>
    <h1>我是news页</h1>
    {{ num }}
    {{ $store.getters.num2 }}
    {{ num2 }}
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  mounted () {
    console.log(this.$store)
  },
  computed: {
    ...mapGetters(['num2']),
    num () {
      return this.$store.state.num*2
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
